export function getSyst (){
	
	uni.getSystemInfo({
		success: function (res) {
		    console.log(res.statusBarHeight);
		    console.log(res.navigationBarHeight);
		    console.log(res.titleBarHeight);
			const sysData = res;
		    return statusBarHeight
		}
	});
}
export function show (txt,num,dur){
	var icon = "";
	if(num==1)icon="success";
	if(num==2)icon="loading";
	if(num==0)icon="none";
	uni.showToast({
	    title: txt,
		icon,
	    duration: dur?dur:2000,	
	});
}
export const showM = (data,conFun,canFun)=>{
	uni.showModal({
		title:data.title,
	    content:data.content,
	    success: function (res) {
	        if (res.confirm) {
				conFun	
	        }else if (res.cancel) {
				canFun
			}
	    }
	});　
}
export const load = (txt)=>{
	uni.showLoading({
	    title: txt
	});
}
export function hide (txt){
	uni.hideLoading()
}

export const navt = (url)=>{
	uni.navigateTo({
		url
	})
}
export const st = (url)=>{
	uni.switchTab({
		url
	})
}
export const rel = (url)=>{
	uni.reLaunch({
		url
	})
}
export const sub = (val,num1,num2)=>{
	return val.substring(num1,num2)　
}
export const ret = (val,str)=>{
	return val.indexOf(str)
}

